

export const scroll = {
  data() {
    return {
      isHeader: false,
      navIndex: 1
    }
  },

  methods: {
    // 页面滚动事件
    pageScroll(e, distance) {
      let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
      if (distance == 100) {
        scrollTop > distance ? this.isHeader = true : this.isHeader = false
      }
    },
  },
}


// 登录注册页面细节显示
export const handleShow = {
  data() {
    return {
      isShow: true,
      password: '',
    }
  },
  computed: {
    pass() {
      return this.password ? true : false
    }
  },
  methods: {
    cancelVal() {
      this.password = ""
    },
    changeInfo() {
      if (this.password.trim()) {
        this.isShow = !this.isShow
        if (this.isShow) {
          this.$refs.inputInfo.type = 'password'
        }
        else {
          this.$refs.inputInfo.type = 'text'
        }
      }
    }
  },
}